
App({
  onLaunch() {
    // console.log(this.globalData)

    this.globalData = {
      userInfo: {
        age: 18,
        name: 'zhangsan'
      }
    }

    // console.log(this.globalData)
  },
  onShow() {
    // console.log(this.globalData)
  },
  globalData: {},
  remind() {
    return 'hello world'
  },
  ajax(option) {
    return new Promise((resolve, reject) => {
      wx.request({
        url: option.url,
        method: option.method || 'GET',
        success(res) {
          resolve(res)
        },
        fail(res) {
          reject(res)
        }
      })
    })
  }
})
